package com.seafood.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;

/**
 * 购物车DTO
 */
@Data
public class ShoppingCartDTO {
    
    private Long id;
    
    private Long userId;
    
    @NotNull(message = "产品ID不能为空")
    private Long productId;
    
    private String productName;
    
    private String productImage;
    
    private BigDecimal productPrice;
    
    private String productUnit;
    
    private Integer stockQuantity;
    
    @NotNull(message = "数量不能为空")
    @Positive(message = "数量必须大于0")
    private Integer quantity;
    
    private BigDecimal subtotal;
    
    private Boolean inStock;
    
    private String createdAt;
    
    private String updatedAt;
}